
const ExportJsonExcel = require('js-export-excel')

// import ExportJsonExcel from'js-export-excel'
function toExcel(fileName,datas){
  var option={};
 
option.fileName = fileName||'excel'
option.datas=datas||[
  {
   //第一个sheet
    sheetData:[{one:'一行一列',two:'一行二列'},{one:'二行一列',two:'二行二列'}],
    sheetName:'sheet',
    sheetFilter:['two','one'],
    sheetHeader:['第一列','第二列']
  },
];
var toExcel=new ExportJsonExcel(option);
toExcel.saveExcel();
}
export default toExcel